<?php
$uid = JRequest::getString('uid', '');
$appid = JRequest::getString('appid', 'resume');
?>
<div class="feedback_dialogtable">
<?php if(!empty($_['jobManagerList'])): ?>
   <table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
         <?php 
         $n=count($_['jobManagerList']);
         for ($i=0; $i < $n; $i++) {
            $jobManager = $_['jobManagerList'][$i];
            if ($i != 0 && ($i%4) == 0) {
               echo '</tr><tr>';
            }
         ?>
         <?php if($appid=='reports'): ?>
            <td width="25%"><a class="<?=($uid == $jobManager['uid'] ? 'cur_a' : '')?>" href="<?=($uid == $jobManager['uid'] ? 'javascript:;' : OC_Helper::linkToRoute('reports_subaccountdetail', array('uid'=>$jobManager['uid'])));?>"><?=strmaxwordlen($jobManager['displayname'], 6)?></a></td>
         <?php else: ?>
            <td width="25%"><a class="<?=($jobManager['admin'] ? 'cur_a' : '')?>" href="javascript:;" data-uid="<?=$jobManager['uid']?>"><?=$jobManager['displayname']?></a></td>
         <?php endif;?>
         <?php 
         }
         
         $filledNum = 4 - ($n%4);
         if ($filledNum < 4) {
            for ($i=0; $i < $filledNum; $i++) {
               echo '<td></td>';
            }
         }
         ?>
      </tr>
   </table>
<?php endif; ?>
</div>